/*!
 * gulp
 * $
  cnpm install  gulp gulp-sftp --save-dev
 */
// 加载各个模块
var gulp = require('gulp')
var sftp = require('gulp-sftp')
gulp.task('deploy', function () {
  /**  test */
  // var _conf = {
  //     host: '47.94.231.168',
  //     remotePath: '/home/wwwroot/default/case/hxmsc',
  //     user: 'root',
  //     pass: '@Flan010scmmf5bl'
  // }
  /* *正式 */
  var _conf = {
    host: '101.37.70.47',
    clearDestination: true,
    remotePath: '/home/wwwroot/default/hyan_weixin/public/pages/h5/2017/vank/invoice',
    user: 'root',
    pass: '010.@Flanyanhao'
  }
  /** 周欣鹏 */
  // var _conf = {
  //   host: '101.200.50.251',
  //   remotePath: '/root/vk_bill',
  //   user: 'root',
  //   pass: 'zxpdealy123'
  // }
  return gulp.src(['dist/static/**', 'dist/index.html'])
      .pipe(sftp(_conf))
})
